package com.sixth.until;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @program: self-tui-education
 * @description:
 * @author: 老魏
 * @create: 2022-04-22 15:50
 **/
public class OrderNoUtil {
    public static  String getOrderNo(){
        String orderNo = "" ;
        String trandNo = String.valueOf((Math.random() * 9 + 1) * 1000000);
        String sdf = new SimpleDateFormat("yyyyMMddHHMMSS").format(new Date());
        orderNo = trandNo.toString().substring(0, 4);
        orderNo = orderNo + sdf ;
        return orderNo ;
    }
}
